#ifndef __MYI2C_H
#define __MYI2C_H
#include "main.h"
#include "stdio.h"
#include "i2c.h"
#include <stdbool.h>
#define sht20_address_w 0x80
#define sht20_address_r 0x81
#define t_cmd 0xe3
#define rh_cmd 0xe5
uint16_t i2c_read(uint8_t cmd);
void sht20_data(void);
extern int wendumax;
extern int wendumin;
extern int soil_shidumax;
extern int lightmax;
extern int lightmin;
extern int light;
extern float temperature;
extern float humidity;
extern float soil_humidity;
extern bool lamp;//光照开关
extern bool fan;//风扇
extern bool irrigated;//洒水器，led2代替
extern bool alarm;//蜂鸣器
extern bool zheyang;//遮阳棚，led3代替（未用）
#endif